package edu.ntu.im.p2ptrade.action;

import javax.servlet.http.HttpServletRequest;

import edu.ntu.im.p2ptrade.LockManager;

public class PrepareToUpdate extends AjaxAction {

	@Override
	public AjaxResponse execute(HttpServletRequest request) {
		boolean locked = LockManager.getInstance().lockMySelf();
		if (locked){
			return success();
		}else {
			return fail("Fail to obtain lock!! Try Later");
		}
		
	}

}
